#ifndef _DECRYPTER_H_
#define _DECRYPTER_H_

#include "EventProcessor.h"
#include "EventProcessorImp.h"
#include "Message.h"

class DecrypterImp : public EventProcessorImp {
	private:
		// long int sum; // the total sum the adder maintains
		DistributedCounter &dCounter;

		EventProcessor controller;

	public:
		DecrypterImp(EventProcessor& _controller, DistributedCounter& _dCounter);  
		void SendDecryptedBlock(string received, int id);
		
		MESSAGE_HANDLER_DECLARATION(DecryptThis);

		MESSAGE_HANDLER_DECLARATION(Die);
};

// Interface class
class Decrypter : public EventProcessor {
 public:
  Decrypter(EventProcessor& _controller, DistributedCounter& _dCounter);
};

inline Decrypter::Decrypter(EventProcessor& _controller, DistributedCounter& _dCounter){
  evProc = new DecrypterImp(_controller,_dCounter);
}

#endif 
